This disclosure relates generally to cache management in a multi-processor computing environment, and more specifically to dynamic coherency protocol granularity modification for individual cache lines in a multi-processor computing environment with transactional memory.
The number of central processing unit (CPU) cores on a chip and the number of CPU cores connected to a shared memory continues to grow significantly to support growing workload capacity demand. The increasing number of CPUs cooperating to process the same workloads puts a significant burden on software scalability; for example, shared queues or data-structures protected by traditional semaphores become hot spots and lead to sub-linear n-way scaling curves. Traditionally this has been countered by implementing finer-grained locking in software, and with lower latency/higher bandwidth interconnects in hardware. Implementing fine-grained locking to improve software scalability can be very complicated and error-prone, and at today's CPU frequencies, the latencies of hardware interconnects are limited by the physical dimension of the chips and systems, and by the speed of light.
Implementations of hardware Transactional Memory (TM) have been introduced, wherein a group of instructions, called a transaction, operate atomically and in isolation (sometimes called “serializability”) on a data structure in memory. The transaction executes optimistically without obtaining a lock, but may need to abort and retry the transaction execution if an operation, of the executing transaction, on a memory location conflicts with another operation on the same memory location. Previously, software transactional memory implementations have been proposed to support software Transactional Memory (TM). However, hardware TM can provide improved performance aspects and ease of use over software TM.
U.S. Patent Application Publication No 2004/0044850 titled “Method and Apparatus for the Synchronization of Distributed Caches” filed 2002 Aug. 28, incorporated herein by reference in its entirety, teaches a hierarchical caching protocol suitable for use with distributed caches, including use within a caching input/output hub.
U.S. Pat. No. 5,586,297 titled “Partial Cache Line Write Transactions in a Computing System with a Write Back Cache” filed 1994 Mar. 24, incorporated herein by reference in its entirety, teaches a computing system which includes a memory, an input/output adapter and a processor. The processor includes a write back cache in which dirty data may be stored. When performing a coherent write from the input/output adapter to the memory, a block of data is written from the input/output adapter to a memory location within the memory. The block of data contains less data than a full cache line in the write back cache. The write back cache is searched to determine whether the write back cache contains data for the memory location. When the search determines that the write back cache contains data for the memory location, a full cache line which contains the data for the memory location is purged.